package com.xwm93up.javatips.mapper;

import com.xwm93up.javatips.dto.MemberDto;
import com.xwm93up.javatips.po.Member;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

/**
 * @Description: desc
 * @Author: xwm93up
 * @Since: 2021/10/27 17:30
 */
@Mapper(componentModel = "spring")
public interface MemberSpringMapper {
    @Mapping(source = "phone", target = "phoneNumber")
    @Mapping(source = "birthday", target = "birthday", dateFormat = "yyyy-MM-dd")
    MemberDto toDto(Member member);
}
